import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 引入全局方法
import "./utils/global";
import './plugins/element.js'
import './assets/css/global.css'
import './assets/css/icon.css'
import  VueQuillEditor from 'vue-quill-editor'
 // require styles 引入样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)// // 将富文本编辑器，注册为全局可用的组件
// 导入树形插件
import Treetable from 'vue-table-with-tree-grid'
Vue.config.productionTip = false

// 全局过滤器（年月日）
Vue.filter('dateFormat', function(originVal) {
  const dt = new Date(originVal)

  const y = dt.getFullYear()
  const m = (dt.getMonth() + 1 + '').padStart(2, '0')
  const d = (dt.getDate() + '').padStart(2, '0')

  const hh = (dt.getHours() + '').padStart(2, '0')
  const mm = (dt.getMinutes() + '').padStart(2, '0')
  const ss = (dt.getSeconds() + '').padStart(2, '0')

  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})


Vue.component('tree-table',Treetable)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
